-- GENERATED SPELL FOR [Kataru] --


function spell0_18080(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(12058,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18080', 3000, 1)
end

function spell1_18080(pUnit, Event) --@Earth Shield,n/a--
pUnit:FullCastSpellOnTarget(32734,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18080', 666, 1)
end

function spell2_18080(pUnit, Event) --@Superior Healing Ward,Self--
pUnit:FullCastSpellOnTarget(15869,pUnit)
pUnit:RegisterEvent('Sorts_18080', 32000, 1)
end

function Sorts_18080(pUnit, Event)
local choix_sorts_18080 = math.random(0, 2)
if choix_sorts_18080 == 0 then
pUnit:RegisterEvent('spell0_18080', 1, 1)
end
if choix_sorts_18080 == 1 then
pUnit:RegisterEvent('spell1_18080', 1, 1)
end
if choix_sorts_18080 == 2 then
pUnit:RegisterEvent('spell2_18080', 1, 1)
end
end

function mob18080_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18080', math.random(1500, 3000), 1)
end

function mob18080_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18080_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18080_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18080, 1, 'mob18080_Action')
RegisterUnitEvent(18080, 2, 'mob18080_Leave')
RegisterUnitEvent(18080, 3, 'mob18080_Kill')
RegisterUnitEvent(18080, 4, 'mob18080_Die')
